package com.example.teesystem.entity.vo.boatGame;

import com.example.teesystem.entity.Issue;
import com.example.teesystem.entityDto.IssueSimpleMessage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author pxr
 * @data 26/11/2022 下午2:01
 */
@Data
@NoArgsConstructor
public class SearchResponse {
    private List<BoatPlayer> boatPlayers;
    private List<IssueSimpleMessage> issueSimpleMessages = new ArrayList<>();

    public SearchResponse(List<BoatPlayer> boatPlayers,List<Issue> issues){
        this.boatPlayers = boatPlayers;
        for (Issue issue : issues) {
            this.issueSimpleMessages.add(new IssueSimpleMessage(issue));
        }
    }
}
